package com.lanhai.zhonglai.dao;

import com.lanhai.zhonglai.enums.TransDirectionEnum;

/**
 * 传输类型
 * @author zhengwei
 *
 */
public class AgvTransferLog {
	private int agvid;
	//车辆动作,out上料/送料(篮)、in下料/接料(篮) 
	private String agv_action;
	//1料、2空篮
	private int material_type;

	private int  basket_num;

	//花篮类型：1花篮、2原始硅料盒、3成品料盒'
	private int  basket_type;

	private String station_name;
	private String station_ip;
	private int step;
	private String finish_time;

	public AgvTransferLog(int agvid,String process,String ip,String stationname,String finishtime,TransDirectionEnum transType) {
		this.agvid=agvid;
		material_type=1;  //2=空篮；
		basket_num=10;
		station_ip=ip;
		station_name=stationname;
		basket_type=1;
		finish_time=finishtime;

		if(process.equals("制绒上料")) { 
			//制绒上料空花篮
			material_type=2; 
		}else if(process.equals("碱抛上料")) { 
			material_type=2;   
		}else if(process.equals("ALD干法")&&transType==TransDirectionEnum.OnlyIn) { 
			 //干法上空花篮
			 material_type=2;  
		}else if(process.equals("ALD湿法")&&transType==TransDirectionEnum.OnlyOut) { 
			 //湿法出空花篮
			 material_type=2;  
		}else if(process.equals("BSG")&&transType==TransDirectionEnum.OnlyOut ) {
			//BSG出空花篮
			 material_type=2;  
		}else if(process.equals("发料上料") ) {
			basket_type=2;
			basket_num=6;
			if(transType==TransDirectionEnum.OnlyOut) {
				//发料上料拿到的是空篮
				 material_type=2; 
			} 
		}else if(process.equals("拆包") ) {	 
			basket_type=2;
			basket_num=6;
			if(transType==TransDirectionEnum.OnlyIn) {
				 //进料是空篮
				 material_type=2; 
			} 
		}
		
		 
		
		switch (transType) { 
		case OnlyIn:
			agv_action="in";
			break;
		case OnlyOut:
			agv_action="out";
			break;
		default:
			break;
		 
		}
	}

 
	
	 



	public int getAgvid() {
		return agvid;
	}
	public void setAgvid(int agvid) {
		this.agvid = agvid;
	}
	public String getAgv_action() {
		return agv_action;
	}
	public void setAgv_action(String agv_action) {
		this.agv_action = agv_action;
	}
	public int getMaterial_type() {
		return material_type;
	}
	public void setMaterial_type(int material_type) {
		this.material_type = material_type;
	}
	public int getBasket_num() {
		return basket_num;
	}
	public void setBasket_num(int basket_num) {
		this.basket_num = basket_num;
	}
	public int getBasket_type() {
		return basket_type;
	}
	public void setBasket_type(int basket_type) {
		this.basket_type = basket_type;
	}
	public String getStation_name() {
		return station_name;
	}
	public void setStation_name(String station_name) {
		this.station_name = station_name;
	}
	public String getStation_ip() {
		return station_ip;
	}
	public void setStation_ip(String station_ip) {
		this.station_ip = station_ip;
	}
	public int getStep() {
		return step;
	}
	public void setStep(int step) {
		this.step = step;
	}
	public String getFinish_time() {
		return finish_time;
	}
	public void setFinish_time(String finish_time) {
		this.finish_time = finish_time;
	}



}
